package com.ruoyi.money.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.money.mapper.SysUserWithdrawalMapper;
import com.ruoyi.money.domain.SysUserWithdrawal;
import com.ruoyi.money.service.ISysUserWithdrawalService;

/**
 * 用户提现记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class SysUserWithdrawalServiceImpl implements ISysUserWithdrawalService 
{
    @Autowired
    private SysUserWithdrawalMapper sysUserWithdrawalMapper;

    /**
     * 查询用户提现记录
     * 
     * @param withdrawalId 用户提现记录主键
     * @return 用户提现记录
     */
    @Override
    public SysUserWithdrawal selectSysUserWithdrawalByWithdrawalId(Long withdrawalId)
    {
        return sysUserWithdrawalMapper.selectSysUserWithdrawalByWithdrawalId(withdrawalId);
    }

    /**
     * 查询用户提现记录列表
     * 
     * @param sysUserWithdrawal 用户提现记录
     * @return 用户提现记录
     */
    @Override
    public List<SysUserWithdrawal> selectSysUserWithdrawalList(SysUserWithdrawal sysUserWithdrawal)
    {
        return sysUserWithdrawalMapper.selectSysUserWithdrawalList(sysUserWithdrawal);
    }

    /**
     * 新增用户提现记录
     * 
     * @param sysUserWithdrawal 用户提现记录
     * @return 结果
     */
    @Override
    public int insertSysUserWithdrawal(SysUserWithdrawal sysUserWithdrawal)
    {
        sysUserWithdrawal.setCreateTime(DateUtils.getNowDate());
        return sysUserWithdrawalMapper.insertSysUserWithdrawal(sysUserWithdrawal);
    }

    /**
     * 修改用户提现记录
     * 
     * @param sysUserWithdrawal 用户提现记录
     * @return 结果
     */
    @Override
    public int updateSysUserWithdrawal(SysUserWithdrawal sysUserWithdrawal)
    {
        sysUserWithdrawal.setUpdateTime(DateUtils.getNowDate());
        return sysUserWithdrawalMapper.updateSysUserWithdrawal(sysUserWithdrawal);
    }

    /**
     * 批量删除用户提现记录
     * 
     * @param withdrawalIds 需要删除的用户提现记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserWithdrawalByWithdrawalIds(Long[] withdrawalIds)
    {
        return sysUserWithdrawalMapper.deleteSysUserWithdrawalByWithdrawalIds(withdrawalIds);
    }

    /**
     * 删除用户提现记录信息
     * 
     * @param withdrawalId 用户提现记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserWithdrawalByWithdrawalId(Long withdrawalId)
    {
        return sysUserWithdrawalMapper.deleteSysUserWithdrawalByWithdrawalId(withdrawalId);
    }
}
